<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>hello</title>
</head>
<body>




<div id="app">

    <heima43 local="上海" age="50"></heima43>

</div>



<script src="./node_modules/vue/dist/vue.js"></script>
<script type="text/javascript">
    //局部组件,需要声明注册到某个vue实例中才可以使用
    let heima43 = {
        template:
            `<div>
                    今天天气有点冷,温度{{tem}}℃,你当前所在的位置为:{{local}}
                     <br>今年年岁为：{{age}}
                    <button @click="tem++">点我升温</button>
             </div>`,
        data(){
            return{
                tem:"18"
            }
        },
        props:['local','age']
    };


    var vm = new Vue({
        el:"#app",
        components:{
            heima43
        }
    })
    let vm1 = new Vue({
        el:"#haha",
        components:{
            heiha:heima43
        }
    })
</script>


</body>
</html>